<template>
    <dd-scrollbar ref="scrollbar" longButton="5em" />
    <dd-flex gap="1em">
        <dd-button @click="moveTo(20)">moveTo 20px</dd-button>
        <dd-button @click="moveTo(50)">moveTo 50px</dd-button>
        <dd-button @click="moveTo(100)">moveTo 100px</dd-button>
    </dd-flex>
</template>

<script setup lang="ts">
import { ref } from "vue";
import { DdScrollbar } from "ddong-ui"

const scrollbar = ref<InstanceType<typeof DdScrollbar>>()

function moveTo(left: number) {
    scrollbar.value?.moveTo(left)
}
</script>
